package itheima.com.d03_hashmap;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class test2 {
    public static void main(String[] args) {
        //1.存储省份和其包含的城市信息
        //  一一对应的数据：省份----城市列表，选择Map集合HashMap
        //  HashMap<String  ,  List<String>>
        Map<String, List<String>> cities = new HashMap<>();

        //2.存储数据
        String province1 = "江苏";
        List<String> city1 = List.of("南京","苏州","无锡");
        cities.put(province1,city1);

        String province2 = "山东";
        List<String> city2 = List.of("济南","青岛","烟台");
        cities.put(province2,city2);
//
        cities.forEach((k,v)->
                System.out.println(k+"---"+v));
    }
}
